Integrand Simplification Rules

1.  ∫u(((v+w))^p)dx  when v==0

x:  ∫u(((v+w))^p)dx  when v==0

Derivation: Algebraic simplification

Note: Many rules assume coefficients are not unrecognized zeros.

Note: Unfortunately this rule is commented out because it is too inefficient.

Rule: If  v==0, then

∫u(((v+w))^p)dx  ⟶  ∫u (w^p)dx

Program code:

(* Int[u_.*(v_+w_)^p_.,x_Symbol] :=
  Int[u*w^p,x] /;
FreeQ[p,x] && EqQ[v,0] *)

1:  ∫u(((a+b (x^n)))^p)dx  when a==0

Derivation: Algebraic simplification

Rule: If  a==0, then

∫u(((a+b (x^n)))^p)dx  ⟶  ∫u(((b (x^n)))^p)dx

Program code:

Int[u_.*(a_+b_.*x_^n_.)^p_.,x_Symbol] :=
  Int[u*(b*x^n)^p,x] /;
FreeQ[{a,b,n,p},x] && EqQ[a,0]

2:  ∫u(((a+b (x^n)))^p)dx  when b==0

Derivation: Algebraic simplification

Rule: If  b==0, then

∫u(((a+b (x^n)))^p)dx  ⟶  ∫u (a^p)dx

Program code:

Int[u_.*(a_.+b_.*x_^n_.)^p_.,x_Symbol] :=
  Int[u*a^p,x] /;
FreeQ[{a,b,n,p},x] && EqQ[b,0]

3:  ∫u(((a+b (x^n)+c (x^(2 n))))^p)dx  when a==0

Derivation: Algebraic simplification

Rule: If  a==0, then

∫u(((a+b (x^n)+c (x^(2 n))))^p)dx  ⟶  ∫u(((b (x^n)+c (x^(2 n))))^p)dx

Program code:

Int[u_.*(a_+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  Int[u*(b*x^n+c*x^(2*n))^p,x] /;
FreeQ[{a,b,c,n,p},x] && EqQ[j,2*n] && EqQ[a,0]

4:  ∫u(((a+b (x^n)+c (x^(2 n))))^p)dx  when b==0

Derivation: Algebraic simplification

Rule: If  b==0, then

∫u(((a+b (x^n)+c (x^(2 n))))^p)dx  ⟶  ∫u(((a+c (x^(2 n))))^p)dx

Program code:

Int[u_.*(a_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  Int[u*(a+c*x^(2*n))^p,x] /;
FreeQ[{a,b,c,n,p},x] && EqQ[j,2*n] && EqQ[b,0]

5:  ∫u(((a+b (x^n)+c (x^(2 n))))^p)dx  when c==0

Derivation: Algebraic simplification

Rule: If  c==0, then

∫u(((a+b (x^n)+c (x^(2 n))))^p)dx  ⟶  ∫u(((a+b (x^n)))^p)dx

Program code:

Int[u_.*(a_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  Int[u*(a+b*x^n)^p,x] /;
FreeQ[{a,b,c,n,p},x] && EqQ[j,2*n] && EqQ[c,0]

2:  ∫u(((a v+b v+w))^p)dx  when v depends on x

Derivation: Algebraic simplification

Rule: If  v depends on x, then

∫u(((a v+b v+w))^p)dx  ⟶  ∫u ((((a+b) v+w))^p)dx

Program code:

Int[u_.*(a_.*v_+b_.*v_+w_.)^p_.,x_Symbol] :=
  Int[u*((a+b)*v+w)^p,x] /;
FreeQ[{a,b},x] && Not[FreeQ[v,x]]

3:  ∫u ((P[x])^p)dx  when p∉ℚ ∧ Simplify[p]∈ℚ

Derivation: Algebraic simplification

Note: Rubi’s integration rules assume integer and rational exponents are recognized as such.

Rule: If  p∉ℚ ∧ Simplify[p]∈ℚ, then

∫u ((P[x])^p)udx  ⟶  ∫u ((P[x])^(Simplify[p]))dx

Program code:

Int[u_.*Px_^p_,x_Symbol] :=
  Int[u*Px^Simplify[p],x] /;
PolyQ[Px,x] && Not[RationalQ[p]] && FreeQ[p,x] && RationalQ[Simplify[p]]

4.  ∫a u dx

1:  ∫a dx

Reference: CRC 1

Rule:

∫adx  ⟶  a x

Program code:

Int[a_,x_Symbol] :=
   a*x /;
FreeQ[a,x]

2:  ∫a (b+c x)dx

Derivation: Power rule for integration

Rule:

∫a (b+c x)dx  ⟶  ((a (((b+c x))^2))/(2 c))

Program code:

Int[a_*(b_+c_.*x_),x_Symbol] :=
  a*(b+c*x)^2/(2*c) /;
FreeQ[{a,b,c},x]

3:  ∫a u dx

Reference: G&R 2.02.1, CRC 2

Derivation: Constant extraction

Note: Since the rule for extracting the imaginary unit from integrands includes the function Identity, it is not displayed when showing steps thus avoiding trivial steps when integrating expressions involving hyperbolic functions.

Rule:

∫a udx  ⟶  a∫udx

Program code:

Int[-u_,x_Symbol] :=
  Identity[-1]*Int[u,x]

Int[Complex[0,a_]*u_,x_Symbol] :=
  Complex[Identity[0],a]*Int[u,x] /;
FreeQ[a,x] && EqQ[a^2,1]

Int[a_*u_,x_Symbol] :=
  a*Int[u,x] /;
FreeQ[a,x] && Not[MatchQ[u, b_*v_ /; FreeQ[b,x]]]

5:  ∫a u+b v+⋯dx

Reference: G&R 2.02.2, 2.111.1  CRC 2, 4, 23, 27

Note: By actually integrating linear power of x terms, this rule eliminates numerous trivial integration steps.

Rule:

∫a u+b v+⋯dx  ⟶  a ∫udx+b ∫vdx+⋯

Program code:

If[TrueQ[$LoadShowSteps],

Int[u_,x_Symbol] :=
  ShowStep["","Int[a*u + b*v + ⋯,x]","a*Integrate[u,x] + b*Integrate[v,x] + ⋯",Hold[
  IntSum[u,x]]] /;
SimplifyFlag && SumQ[u],

Int[u_,x_Symbol] :=
  IntSum[u,x] /;
SumQ[u]]

6:  ∫(((c x))^m)(u+v+⋯)dx

Derivation: Algebraic expansion

Rule:

∫(((c x))^m)(u+v+⋯)dx  ⟶  ∫(((c x))^m)u+(((c x))^m)v+⋯dx

Program code:

Int[(c_.*x_)^m_.*u_,x_Symbol] :=
  Int[ExpandIntegrand[(c*x)^m*u,x],x] /;
FreeQ[{c,m},x] && SumQ[u] && Not[LinearQ[u,x]] && Not[MatchQ[u,a_+b_.*v_ /; FreeQ[{a,b},x] && InverseFunctionQ[v]]]

7.  ∫u(((a v))^m)(((b v))^n)⋯dx

1:  ∫u(((a (x^n)))^m)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((a (x^n)))^m)/(x^(m n)))==0

Rule: If  m∉ℤ, then

∫u(((a (x^n)))^m)x  ⟶  (((a^(IntPart[m]))(((a (x^n)))^(FracPart[m])))/(x^(n FracPart[m])))∫u (x^(m n))dx

Program code:

Int[u_.*(a_.*x_^n_)^m_,x_Symbol] :=
  a^IntPart[m]*(a*x^n)^FracPart[m]/x^(n*FracPart[m])*Int[u*x^(m*n),x] /;
FreeQ[{a,m,n},x] && Not[IntegerQ[m]]

2:  ∫u (v^m)(((b v))^n)dx  when  m∈ℤ

Derivation: Algebraic simplification

Basis: If  m∈ℤ, then (v^m)==(1/(b^m))(((b v))^m)

Rule: If  m∈ℤ, then

∫u (v^m)(((b v))^n)dx  ⟶  (1/(b^m))∫u(((b v))^(m+n))dx

Program code:

Int[u_.*v_^m_.*(b_*v_)^n_,x_Symbol] :=
  1/b^m*Int[u*(b*v)^(m+n),x] /;
FreeQ[{b,n},x] && IntegerQ[m]

3.  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n∉ℤ

1.  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n+(1/2)∈ℤ

1.  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n+(1/2)∈(SuperPlus[ℤ])

1:  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n+(1/2)∈(SuperPlus[ℤ])∧ m+n∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[b F[x]])/(Sqrt[a F[x]]))==0

Basis: If  n+(1/2)∈ℤ, then (((b v))^n)==(((b^(n-(1/2)))(Sqrt[b v]))/((a^(n-(1/2)))(Sqrt[a v])))(((a v))^n)

Rule: If  m∉ℤ ∧ n+(1/2)∈(SuperPlus[ℤ])∧ m+n∈ℤ, then

∫u(((a v))^m)(((b v))^n)dx  ⟶  (((a^(m+(1/2)))(b^(n-(1/2)))(Sqrt[b v]))/(Sqrt[a v]))∫u (v^(m+n))dx

Program code:

Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] :=
  a^(m+1/2)*b^(n-1/2)*Sqrt[b*v]/Sqrt[a*v]*Int[u*v^(m+n),x] /;
FreeQ[{a,b,m},x] && Not[IntegerQ[m]] && IGtQ[n+1/2,0] && IntegerQ[m+n]

x:  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n+(1/2)∈(SuperPlus[ℤ])∧ m+n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[b F[x]])/(Sqrt[a F[x]]))==0

Basis: If  n+(1/2)∈ℤ, then (((b v))^n)==(((b^(n-(1/2)))(Sqrt[b v]))/((a^(n-(1/2)))(Sqrt[a v])))(((a v))^n)

Rule: If  m∉ℤ ∧ n+(1/2)∈(SuperPlus[ℤ])∧ m+n∉ℤ, then

∫u(((a v))^m)(((b v))^n)dx  ⟶  (((b^(n-(1/2)))(Sqrt[b v]))/((a^(n-(1/2)))(Sqrt[a v])))∫u(((a v))^(m+n))dx

Program code:

(* Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] :=
  b^(n-1/2)*Sqrt[b*v]/(a^(n-1/2)*Sqrt[a*v])*Int[u*(a*v)^(m+n),x] /;
FreeQ[{a,b,m},x] && Not[IntegerQ[m]] && IGtQ[n+1/2,0] && Not[IntegerQ[m+n]] *)

2.  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n-(1/2)∈(SuperMinus[ℤ])

1:  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n-(1/2)∈(SuperMinus[ℤ])∧ m+n∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[a F[x]])/(Sqrt[b F[x]]))==0

Basis: If  n-(1/2)∈ℤ, then (((b v))^n)==(((b^(n+(1/2)))(Sqrt[a v]))/((a^(n+(1/2)))(Sqrt[b v])))(((a v))^n)

Rule: If  m∉ℤ ∧ n-(1/2)∈(SuperMinus[ℤ])∧ m+n∈ℤ, then

∫u(((a v))^m)(((b v))^n)dx  ⟶  (((a^(m-(1/2)))(b^(n+(1/2)))(Sqrt[a v]))/(Sqrt[b v]))∫u (v^(m+n))dx

Program code:

Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] :=
  a^(m-1/2)*b^(n+1/2)*Sqrt[a*v]/Sqrt[b*v]*Int[u*v^(m+n),x] /;
FreeQ[{a,b,m},x] && Not[IntegerQ[m]] && ILtQ[n-1/2,0] && IntegerQ[m+n]

x:  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n-(1/2)∈(SuperMinus[ℤ])∧ m+n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[a F[x]])/(Sqrt[b F[x]]))==0

Basis: If  n-(1/2)∈ℤ, then (((b v))^n)==(((b^(n+(1/2)))(Sqrt[a v]))/((a^(n+(1/2)))(Sqrt[b v])))(((a v))^n)

Rule: If  m∉ℤ ∧ n-(1/2)∈(SuperMinus[ℤ])∧ m+n∉ℤ, then

∫u(((a v))^m)(((b v))^n)dx  ⟶  (((b^(n+(1/2)))(Sqrt[a v]))/((a^(n+(1/2)))(Sqrt[b v])))∫u(((a v))^(m+n))dx

Program code:

(* Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] :=
  b^(n+1/2)*Sqrt[a*v]/(a^(n+1/2)*Sqrt[b*v])*Int[u*(a*v)^(m+n),x] /;
FreeQ[{a,b,m},x] && Not[IntegerQ[m]] && ILtQ[n-1/2,0] && Not[IntegerQ[m+n]] *)

2.  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n∉ℤ

1:  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n∉ℤ ∧ m+n∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b F[x]))^n)/(((a F[x]))^n))==0

Rule: If  m∉ℤ ∧ n∉ℤ ∧ m+n∈ℤ, then

∫u(((a v))^m)(((b v))^n)dx  ⟶  (((a^(m+n))(((b v))^n))/(((a v))^n))∫u (v^(m+n))dx

Program code:

Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] :=
  a^(m+n)*(b*v)^n/(a*v)^n*Int[u*v^(m+n),x] /;
FreeQ[{a,b,m,n},x] && Not[IntegerQ[m]] && Not[IntegerQ[n]] && IntegerQ[m+n]

2:  ∫u(((a v))^m)(((b v))^n)dx  when  m∉ℤ ∧ n∉ℤ ∧ m+n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b F[x]))^n)/(((a F[x]))^n))==0

Rule: If  m∉ℤ ∧ n∉ℤ ∧ m+n∉ℤ, then

∫u(((a v))^m)(((b v))^n)dx  ⟶  (((b^(IntPart[n])) (((b v))^(FracPart[n])))/((a^(IntPart[n])) (((a v))^(FracPart[n]))))∫u(((a v))^(m+n))dx

Program code:

Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] :=
  b^IntPart[n]*(b*v)^FracPart[n]/(a^IntPart[n]*(a*v)^FracPart[n])*Int[u*(a*v)^(m+n),x] /;
FreeQ[{a,b,m,n},x] && Not[IntegerQ[m]] && Not[IntegerQ[n]] && Not[IntegerQ[m+n]]

8.  ∫u (((a+b v))^m) (((c+d v))^n)dx  when b c-a d==0

1:  ∫u (((a+b v))^m) (((c+d v))^n)dx  when b c-a d==0 ∧ (m∈ℤ ∨ (b/d)>0)

Derivation: Algebraic simplification

Basis: If  b c-a d==0 ∧ (m∈ℤ ∨ (b/d)>0), then (((a+b z))^m)==((((b/d)))^m)(((c+d z))^m)

Rule: If  b c-a d==0 ∧ (m∈ℤ ∨ (b/d)>0), then

∫u (((a+b v))^m) (((c+d v))^n)dx  ⟶ ((((b/d)))^m)∫u (((c+d v))^(m+n))dx

Program code:

Int[u_.*(a_+b_.*v_)^m_.*(c_+d_.*v_)^n_.,x_Symbol] :=
  (b/d)^m*Int[u*(c+d*v)^(m+n),x] /;
FreeQ[{a,b,c,d,n},x] && EqQ[b*c-a*d,0] && IntegerQ[m] && (Not[IntegerQ[n]] || SimplerQ[c+d*x,a+b*x])

Int[u_.*(a_+b_.*v_)^m_*(c_+d_.*v_)^n_,x_Symbol] :=
  (b/d)^m*Int[u*(c+d*v)^(m+n),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[b*c-a*d,0] && GtQ[b/d,0] && Not[IntegerQ[m] || IntegerQ[n]]

2:  ∫u (((a+b v))^m) (((c+d v))^n)dx  when  b c-a d==0 ∧ ¬(m∈ℤ ∨ n∈ℤ ∨ (b/d)>0)

Derivation: Piecewise constant extraction

Basis: If  b c-a d==0, then (∂_x)((((a+b F[x]))^m)/(((c+d F[x]))^m))==0

Rule: If  b c-a d==0 ∧ ¬(m∈ℤ ∨ n∈ℤ ∨ (b/d)>0), then

∫u (((a+b v))^m) (((c+d v))^n)dx  ⟶  ((((a+b v))^m)/(((c+d v))^m))∫u (((c+d v))^(m+n))dx

Program code:

Int[u_.*(a_+b_.*v_)^m_*(c_+d_.*v_)^n_,x_Symbol] :=
  (a+b*v)^m/(c+d*v)^m*Int[u*(c+d*v)^(m+n),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[b*c-a*d,0] && Not[IntegerQ[m] || IntegerQ[n] || GtQ[b/d,0]]

9:  ∫u(((a+b v))^m)(A+B v+C (v^2))dx  when  A (b^2)-a b B+(a^2) C==0 ∧ m≤-1            ????

Derivation: Algebraic simplification

Basis:  If  A (b^2)-a b B+(a^2) C==0, then A+B z+C (z^2)==(1/(b^2))(a+b z)(b B-a C+b C z)

Rule: If  A (b^2)-a b B+(a^2) C==0 ∧ m≤-1, then

∫u(((a v))^m)(b v+c (v^2))dx  ⟶  (1/a) ∫u(((a v))^(m+1))(b+c v)dx

∫u(((a+b v))^m)(A+B v+C (v^2))dx  ⟶  (1/(b^2)) ∫u(((a+b v))^(m+1))(b B-a C+b C v)dx

Program code:

(* Int[u_.*(a_.*v_)^m_*(b_.*v_+c_.*v_^2),x_Symbol] :=
  1/a*Int[u*(a*v)^(m+1)*(b+c*v),x] /;
FreeQ[{a,b,c},x] && LeQ[m,-1] *)

Int[u_.*(a_+b_.*v_)^m_*(A_.+B_.*v_+C_.*v_^2),x_Symbol] :=
  1/b^2*Int[u*(a+b*v)^(m+1)*Simp[b*B-a*C+b*C*v,x],x] /;
FreeQ[{a,b,A,B,C},x] && EqQ[A*b^2-a*b*B+a^2*C,0] && LeQ[m,-1]

10:  ∫u(((a+b (x^n)))^m)(((c+d (x^(-n))))^p)dx  when a c-b d==0 ∧ p∈ℤ

Derivation: Algebraic simplification

Basis: If  a c-b d==0 ∧ p∈ℤ, then (((c+d (x^(-n))))^p)==((((d/a)))^p)((((a+b (x^n)))^p)/(x^(n p)))

Rule: If  a c-b d==0 ∧ p∈ℤ, then

∫u(((a+b (x^n)))^m)(((c+d (x^(-n))))^p)dx  ⟶ ((((d/a)))^p) ∫((u(((a+b (x^n)))^(m+p)))/(x^(n p)))dx

Program code:

Int[u_.*(a_+b_.*x_^n_.)^m_.*(c_+d_.*x_^q_.)^p_.,x_Symbol] :=
  (d/a)^p*Int[u*(a+b*x^n)^(m+p)/x^(n*p),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[q,-n] && IntegerQ[p] && EqQ[a*c-b*d,0] && Not[IntegerQ[m] && NegQ[n]]

11:  ∫u(((a+b (x^n)))^m)(((c+d (x^(2n))))^(-m))dx  when (b^2) c+(a^2) d==0 ∧ a>0 ∧ d<0

Derivation: Algebraic simplification

Basis: If  (b^2) c+(a^2) d==0 ∧ a>0 ∧ d<0, then (((a+b z))^m)(((c+d (z^2)))^(-m))==(((-((b^2)/d)))^m)(((a-b z))^(-m))

Rule: If  (b^2) c+(a^2) d==0 ∧ a>0 ∧ d<0, then

∫u(((a+b (x^n)))^m)(((c+d (x^(2n))))^(-m))dx  ⟶ (((-((b^2)/d)))^m) ∫u(((a-b (x^n)))^(-m))dx

Program code:

Int[u_.*(a_+b_.*x_^n_.)^m_.*(c_+d_.*x_^j_)^p_.,x_Symbol] :=
  (-b^2/d)^m*Int[u*(a-b*x^n)^(-m),x] /;
FreeQ[{a,b,c,d,m,n,p},x] && EqQ[j,2*n] && EqQ[p,-m] && EqQ[b^2*c+a^2*d,0] && GtQ[a,0] && LtQ[d,0]

12:  ∫u (((a+b (x^n)+c (x^(2 n))))^p)dx  when (b^2)-4 a c==0 ∧ p∈ℤ

Derivation: Algebraic simplification

Basis: If  (b^2)-4 a c=0, then  a+b z+c (z^2)==(1/c)((((b/2)+c z))^2)

Basis: If  (b^2)-4 a c==0, then  a+b z+c (z^2)==((((Sqrt[a])+((b z)/(2 (Sqrt[a])))))^2)

Rule: If  (b^2)-4 a c==0 ∧ p∈ℤ, then

∫u (((a+b (x^n)+c (x^(2 n))))^p)dx  ⟶  (1/(c^p))∫u ((((b/2)+c (x^n)))^(2p))dx

Program code:

Int[u_.*(a_+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  Int[u*Cancel[(b/2+c*x)^(2*p)/c^p],x] /;
FreeQ[{a,b,c},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p]

Int[u_.*(a_+b_.*x_^n_+c_.*x_^n2_.)^p_.,x_Symbol] :=
  1/c^p*Int[u*(b/2+c*x^n)^(2*p),x] /;
FreeQ[{a,b,c,n},x] && EqQ[n2,2*n] && EqQ[b^2-4*a*c,0] && IntegerQ[p]